<template>
  <div>
    <h1>vue3组件使用vue2语法 test语法</h1>
    <h1>{{ msg }}</h1>
    <h2>{{ num }}</h2>
    <input type="text" v-model="num" />
    <button @click="add">加1</button>
  </div>
</template>

<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
  data() {
    return {
      msg: "今天天气很好！！",
      num: 0,
    };
  },
  methods: {
    add() {
      this.num += 1;
    },
  },
});
</script>

<style scoped>
</style>